<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition template="commonLayout.xhtml">
        <ui:define name="content">
            <div class="main center">
                <section class="part clearfix">
                    <header class="title clearfix">
                    </header>
                    <h:body>
                        <script type="text/javascript">
                        function validateForm() {
                            if (document.getElementById("myform:email").value=='' || document.getElementById("myform:firstname").value=='' || document.getElementById("myform:surname").value=='') {
                                alert("#{msg.fillmsg}");
                                return false;
                            }
                            return true;
                        }
                        </script>
                        <h:form id="myform" onsubmit="return validateForm();">
                            <h3><h:outputText value="#{msg.personinfo}" /></h3>
                            <p>
                                <h:outputText value="#{msg.fname}" /><br/><h:inputText id="firstname" value="#{applicantmanager.applicantDTO.name}">
                                    <f:validator validatorId="checkpersonalinfo" />
                                </h:inputText>
                                <br/><br/>
                                <h:outputText value="#{msg.lname}" /><br/><h:inputText id="surname" value="#{applicantmanager.applicantDTO.surname}">
                                    <f:validator validatorId="checkpersonalinfo" />
                                </h:inputText>
                                <br/><br/>
                                Email: <br/><h:inputText id="email" value="#{applicantmanager.applicantDTO.email}">
                                    <f:validator validatorId="checkpersonalinfo" />
                                </h:inputText>
                            </p>
                            <h:commandButton type="submit" id="next" value="#{msg.next}" action="#{applicantmanager.nextPage1}"/>
                        </h:form>
                        <h:form>
                            <h:commandButton value="#{msg.cancel}" action="#{applicantmanager.cancel}" />
                        </h:form>
                    </h:body>
                </section>
            </div>
        </ui:define>
    </ui:composition>
</html>
